package leetcode_701_800;

public class LeeCode_793 {
    public static void main(String[] args) {

    }

    private static int preimageSizeFZF(int k) {
        long s = 1;
        while (s < k) {
            s *= 5;
            s++;
        }
        while (s > 1) {
            if (s - 1 == k)
                return 0;
            s = (s - 1) / 5;
            k %= s;
        }
        return 5;
    }
}